package wk10p2;

import java.util.Vector;

public class UseVector {
	public static void main(String[] a){
		Vector v = new Vector();
		v.add( 1 );
		v.add( 2 );
		v.add( 3 );
		v.add( 4 );
		v.add("Hello");

		System.out.println("Elements of the vector v are:");
		for (int i=0; i<v.size(); i++)
			System.out.println(" 0: " + v.get( i ));

		int sum = 0;
		for (int i=0; i<v.size(); i++)
			sum = sum + (Integer) v.get( i );
		
		System.out.println( "Sum of all the elements is: " + sum);
	}
}
